/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_roles")
//@NamedQueries({@NamedQuery(name = "TRoles.findAll", query = "SELECT t FROM TRoles t"), @NamedQuery(name = "TRoles.findByRoleId", query = "SELECT t FROM TRoles t WHERE t.roleId = :roleId"), @NamedQuery(name = "TRoles.findByRoleName", query = "SELECT t FROM TRoles t WHERE t.roleName = :roleName"), @NamedQuery(name = "TRoles.findByRoleType", query = "SELECT t FROM TRoles t WHERE t.roleType = :roleType")})
public class TRoles implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "role_id")
    private String roleId;
    @Basic(optional = false)
    @Column(name = "role_name")
    private String roleName;
    @Column(name = "role_type")
    private String roleType;

    public TRoles() {
    }

    public TRoles(String roleId) {
        this.roleId = roleId;
    }

    public TRoles(String roleId, String roleName) {
        this.roleId = roleId;
        this.roleName = roleName;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleType() {
        return roleType;
    }

    public void setRoleType(String roleType) {
        this.roleType = roleType;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roleId != null ? roleId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TRoles)) {
            return false;
        }
        TRoles other = (TRoles) object;
        if ((this.roleId == null && other.roleId != null) || (this.roleId != null && !this.roleId.equals(other.roleId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TRoles[roleId=" + roleId + "]";
    }

}
